package com.godme.homework;

public class Uniq {




    public static boolean duplicate(int[] arr){
        boolean[] exist = new boolean[255];
        for(int i: arr){
            if(exist[i]){
                return true;
            }
            exist[i] = true;
        }
        return false;
    }

    public static void main(String[] args) {
        int[] arr = {1,2,3,5,6,4,8,9,7};

        System.err.println(duplicate(arr)? "NO" : "YES");
    }
}
